<template>
  <div>
     <div>
       <ul>
         <li v-for="(obj,index) in myArr" :key="index">{{obj}}</li>
       </ul>
       <button @click="btn">走一走</button>
     </div>
   </div>
</template>
 
<script>
export default {
  data() {
    return {
      myArr: ["帅哥", "美女", "程序猿"],
    }
  },
  methods: {
    btn(){
      // 1.往末尾添加第一项
      this.myArr.push(this.myArr[0])
      // 2.删除第一项
      this.myArr.shift()
    }
  }
};
</script>

<style scoped>
     
</style>